package org.jeecg.modules.ywSemiFinishedProductEnter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.constant.CommonConstant;
import org.jeecg.modules.ywSemiFinishedProductEnter.entity.YwSemiFinishedProductEnterDetail;
import org.jeecg.modules.ywSemiFinishedProductEnter.mapper.YwSemiFinishedProductEnterDetailMapper;
import org.jeecg.modules.ywSemiFinishedProductEnter.service.IYwSemiFinishedProductEnterDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 半成品入库-详情
 * @Author: jeecg-boot
 * @Date: 2024-08-15
 * @Version: V1.0
 */
@Service
public class YwSemiFinishedProductEnterDetailServiceImpl extends ServiceImpl<YwSemiFinishedProductEnterDetailMapper, YwSemiFinishedProductEnterDetail> implements IYwSemiFinishedProductEnterDetailService {

    @Autowired
    private YwSemiFinishedProductEnterDetailMapper ywSemiFinishedProductEnterDetailMapper;

    @Override
    public List<YwSemiFinishedProductEnterDetail> selectByMainId(String mainId) {
        return ywSemiFinishedProductEnterDetailMapper.selectByMainId(mainId);
    }

    @Override
    public List<YwSemiFinishedProductEnterDetail> selectList(String semiFinishedProductEnterMainId) {
        QueryWrapper<YwSemiFinishedProductEnterDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("enter_id", semiFinishedProductEnterMainId);
        queryWrapper.eq("status", CommonConstant.StatusEnum.YES.getCode());
        return this.ywSemiFinishedProductEnterDetailMapper.selectList(queryWrapper);
    }

}
